using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;

namespace PhongKham
{
    public partial class FrmMain : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public FrmMain()
        {
            InitializeComponent();
            this.IsMdiContainer = true;

            /*TextBox txtName = DevExpress.XtraBars.Ribbon.RibbonForm.fi .("txtComment") as TextBox;
            if (txtName != null)
            {
                return txtName.Value;
            }*/
            foreach (BarButtonItem x in ribbon.Items)
            {
                if (x is BarButtonItem )
                {
                    if (x.Name == "btnDvitinh")
                        x.Visibility = BarItemVisibility.Never;
                       
                }
            }

            /*foreach (BaseItem item in ribbon.Items)
            {
                RibbonTabItem ribbonTab = item as RibbonTabItem;

                if (ribbonTab != null)
                {
                    RibbonPanel panel = ribbonTab.Panel;

                    foreach (Control panelControl in panel.Controls)
                    {
                        RibbonBar ribbonBar = panelControl as RibbonBar;

                        if (ribbonBar != null)
                        {
                            // At this point you can simply disable each RibbonBar and that will disable all items on it

                            //ribbonBar.Enabled = false;

                            // Here is how you loop through items on RibbonBar

                            foreach (BaseItem ribbonBarItem in ribbonBar.Items)
                                ribbonBarItem.Enabled = false;
                        }
                    }
                }
            }*/
        }

        private void btnDvitinh_ItemClick(object sender, ItemClickEventArgs e)
        {
            PhongKham.View.FrmDonviTinh frmDvitinh = new PhongKham.View.FrmDonviTinh();
            frmDvitinh.WindowState = FormWindowState.Maximized;
            frmDvitinh.MdiParent = this;            
            frmDvitinh.Show();
        }

        private void btnLoaibenh_ItemClick(object sender, ItemClickEventArgs e)
        {
            PhongKham.View.frmLoaiBenh frmLoaibenh = new PhongKham.View.frmLoaiBenh();
            frmLoaibenh.WindowState = FormWindowState.Maximized;
            frmLoaibenh.MdiParent = this;
            frmLoaibenh.Show();
        }

        private void btnNhomBenh_ItemClick(object sender, ItemClickEventArgs e)
        {
            PhongKham.View.frmNhomBenh frmNhom = new PhongKham.View.frmNhomBenh();
            frmNhom.WindowState = FormWindowState.Maximized;
            frmNhom.MdiParent = this;
            frmNhom.Show();
        }

        private void btnThuoc_ItemClick(object sender, ItemClickEventArgs e)
        {
            PhongKham.View.frmDmThuoc frmThuoc = new PhongKham.View.frmDmThuoc();
            frmThuoc.WindowState = FormWindowState.Maximized;
            frmThuoc.MdiParent = this;
            frmThuoc.Show();
        }

        private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.Dispose();
        }

        private void btnKhambenh_ItemClick(object sender, ItemClickEventArgs e)
        {
            /*PhongKham.View.frmKhambenh frmKhambenh = new PhongKham.View.frmKhambenh();
            frmKhambenh.WindowState = FormWindowState.Maximized;
            frmKhambenh.MdiParent = this;
            frmKhambenh.Show();*/
        }

        private void btnBenhnhan_ItemClick(object sender, ItemClickEventArgs e)
        {
            /*PhongKham.View.frmBenhNhan frmBenhnhan = new PhongKham.View.frmBenhNhan();
            frmBenhnhan.WindowState = FormWindowState.Maximized;
            frmBenhnhan.MdiParent = this;
            frmBenhnhan.Show();*/
        }

        

      


    }
}